3.2.13 \(\int \frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}} \, dx\) [113]

Optimal. Leaf size=49 \[ \frac {c \log (1+\cos (e+f x)) \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \]

[Out]

c*ln(1+cos(f*x+e))*tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {3996, 31} \begin {gather*} \frac {c \tan (e+f x) \log (\cos (e+f x)+1)}{f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[c - c*Sec[e + f*x]]/Sqrt[a + a*Sec[e + f*x]],x]

[Out]

(c*Log[1 + Cos[e + f*x]]*Tan[e + f*x])/(f*Sqrt[a + a*Sec[e + f*x]]*Sqrt[c - c*Sec[e + f*x]])

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3996

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Dist
[(-a)*c*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[c + d*Csc[e + f*x]])), Subst[Int[(b + a*x)^(m - 1/2)*((
d + c*x)^(n - 1/2)/x^(m + n)), x], x, Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[b*c + a*d, 0] &
& EqQ[a^2 - b^2, 0] && IntegerQ[m - 1/2] && EqQ[m + n, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}} \, dx &=\frac {(a c \tan (e+f x)) \text {Subst}\left (\int \frac {1}{a+a x} \, dx,x,\cos (e+f x)\right )}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=\frac {c \log (1+\cos (e+f x)) \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.99, size = 127, normalized size = 2.59 \begin {gather*} -\frac {\left (1+e^{i (e+f x)}\right ) \sqrt {\frac {c \left (-1+e^{i (e+f x)}\right )^2}{1+e^{2 i (e+f x)}}} \left (f x+2 i \log \left (1+e^{i (e+f x)}\right )\right )}{\left (-1+e^{i (e+f x)}\right ) \sqrt {\frac {a \left (1+e^{i (e+f x)}\right )^2}{1+e^{2 i (e+f x)}}} f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[c - c*Sec[e + f*x]]/Sqrt[a + a*Sec[e + f*x]],x]

[Out]

-(((1 + E^(I*(e + f*x)))*Sqrt[(c*(-1 + E^(I*(e + f*x)))^2)/(1 + E^((2*I)*(e + f*x)))]*(f*x + (2*I)*Log[1 + E^(
I*(e + f*x))]))/((-1 + E^(I*(e + f*x)))*Sqrt[(a*(1 + E^(I*(e + f*x)))^2)/(1 + E^((2*I)*(e + f*x)))]*f))

________________________________________________________________________________________

Maple [A]
time = 0.24, size = 75, normalized size = 1.53

method result size
default \(\frac {\sqrt {\frac {c \left (-1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}}\, \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \cos \left (f x +e \right ) \ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )}{f \sin \left (f x +e \right ) a}\) \(75\)
risch \(\frac {\left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, x}{\sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}-\frac {2 \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left (f x +e \right )}{\sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) f}-\frac {2 i \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{\sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) f}\) \(284\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c-c*sec(f*x+e))^(1/2)/(a+a*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/f*(c*(-1+cos(f*x+e))/cos(f*x+e))^(1/2)*(a*(cos(f*x+e)+1)/cos(f*x+e))^(1/2)*cos(f*x+e)*ln(2/(cos(f*x+e)+1))/s
in(f*x+e)/a

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 36, normalized size = 0.73 \begin {gather*} \frac {\sqrt {c} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {-a} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^(1/2)/(a+a*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

sqrt(c)*log(sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)/(sqrt(-a)*f)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^(1/2)/(a+a*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

integral(sqrt(-c*sec(f*x + e) + c)/sqrt(a*sec(f*x + e) + a), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- c \left (\sec {\left (e + f x \right )} - 1\right )}}{\sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))**(1/2)/(a+a*sec(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(-c*(sec(e + f*x) - 1))/sqrt(a*(sec(e + f*x) + 1)), x)

________________________________________________________________________________________

Giac [A]
time = 1.22, size = 36, normalized size = 0.73 \begin {gather*} -\frac {\sqrt {-a c} c \log \left ({\left | c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + c \right |}\right )}{a f {\left | c \right |}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))^(1/2)/(a+a*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

-sqrt(-a*c)*c*log(abs(c*tan(1/2*f*x + 1/2*e)^2 + c))/(a*f*abs(c))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {c-\frac {c}{\cos \left (e+f\,x\right )}}}{\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c - c/cos(e + f*x))^(1/2)/(a + a/cos(e + f*x))^(1/2),x)

[Out]

int((c - c/cos(e + f*x))^(1/2)/(a + a/cos(e + f*x))^(1/2), x)

________________________________________________________________________________________